import { createApp } from 'vue'
import './style.css'
import App from './App.vue'

createApp(App).mount('#app')

// : 'jack' 是字面量类型
let name: 'jack' = 'jack';
// : 18 是字面量类型
let age: 18 = 18;

// 报错：不能将类型“19”分配给类型“18”
// age = 19;

// let gender = '男'
// gender = '女'
// ------------------------
type Gender = '男' | '女'
let gender: Gender = '男'
gender = '女'

let obj: any = { age: 18 }
obj.bar = 100
obj()
const n: number = obj
import { type Food } from './types/data'
const p: Food = {
    name:'你好',
    color:'red',
    taste:'美味',
    date:'23日',
}
import { add , point} from './untils/index';

let res=add(3, 10)
console.log(res)
point({x: 100, y: 200})